package com.xiaodu.acer.phoneplay.data;

import com.xiaodu.acer.phoneplay.bean.AppInfo;
import com.xiaodu.acer.phoneplay.bean.IndexBean;
import com.xiaodu.acer.phoneplay.bean.PageBean;
import com.xiaodu.acer.phoneplay.data.http.ApiService;

import io.reactivex.Observable;
import library.base.BaseBean;


public class AppInfoModel {

    private ApiService mApiService;

    public AppInfoModel(ApiService apiService) {
        this.mApiService = apiService;
    }

    public Observable<BaseBean<IndexBean>> index() {
        return mApiService.index();
    }


    public Observable<BaseBean<PageBean<AppInfo>>> topList(int page) {
        return mApiService.topList(page);
    }

    public Observable<BaseBean<PageBean<AppInfo>>> games(int page) {
        return mApiService.games(page);
    }


    public Observable<BaseBean<PageBean<AppInfo>>> getFeaturedAppsByCategory(int categoryid, int page) {
        return mApiService.getFeaturedAppsByCategory(categoryid, page);
    }

    public Observable<BaseBean<PageBean<AppInfo>>> getTopListAppsByCategory(int categoryid, int page) {
        return mApiService.getTopListAppsByCategory(categoryid, page);
    }

    public Observable<BaseBean<PageBean<AppInfo>>> getNewListAppsByCategory(int categoryid, int page) {
        return mApiService.getNewListAppsByCategory(categoryid, page);
    }

    public Observable<BaseBean<AppInfo>> getAppDetail(int id) {
        return mApiService.getAppDetail(id);
    }


    public Observable<BaseBean<PageBean<AppInfo>>> getHotApps(int page) {
        return mApiService.getHotApps(page);
    }


}
